package action.common;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import dao.common.LoggingNewGoodsDao;
import dao.common.RepertoryDao;
import model.common.LoggingNewGoods;
import model.common.Repertory;

public class LoggingNewGoodsAction {

	public void add(LoggingNewGoods lng) throws SQLException{
		LoggingNewGoodsDao dao=new LoggingNewGoodsDao();
		   dao.addNewGoods(lng);
	   }
	   
	   public void delete(Integer goodsId) throws SQLException{
			LoggingNewGoodsDao dao=new LoggingNewGoodsDao();
		   dao.deleteNewGoods(goodsId);
	   }
	   
	   public void edit(LoggingNewGoods lng) throws SQLException{
			LoggingNewGoodsDao dao=new LoggingNewGoodsDao();
		   dao.updateNewGoods(lng);
	   }
	   
	   public void get(Integer goodsId) throws Exception{
			LoggingNewGoodsDao dao=new LoggingNewGoodsDao();
		   dao.get(goodsId);
	   }
	   
	   public List<LoggingNewGoods> query(List<Map<String, Object>> params) throws Exception{
			LoggingNewGoodsDao dao=new LoggingNewGoodsDao();
			return dao.query(params);
			
		}
		
		public List<LoggingNewGoods> query(String goodsName,Double goodsPrice) throws Exception{
			LoggingNewGoodsDao dao=new LoggingNewGoodsDao();

			return dao.query();
			
		}
}
